# Copyright (c) 2018 Presto Labs Pte. Ltd.
# Author: jaewon

import datetime

from coin.exchange.bitfinex_v2.ws.subscriber import BitfinexV2Subscriber
from coin.strategy.mm.feed_builder import BitfinexFlowBookBuilder
from coin.strategy.mm.base.feed import BaseFeedSubsystem
from coin.strategy.mm.subscription import SubscriptionRequest


class BitfinexV2FeedSubsystem(BaseFeedSubsystem):
  FeedSubReq = SubscriptionRequest('Spot', 'Bitfinex', None)
  FeedSubscriber = BitfinexV2Subscriber
  FlowBookBuilder = BitfinexFlowBookBuilder

  _cooltime_reconnect = datetime.timedelta(seconds=1)
